package demo02;

import java.util.ArrayList;
import java.util.Random;

public class Member extends User {
    public Member() {
    }

    public Member(String userName, double leftMoney) {
        super(userName, leftMoney);
    }

    double MemberMoney = getLeftMoney();

    public void OpenRedPocket(ArrayList<Double> arrayList) {
        Random r = new Random();
        int index=r.nextInt(arrayList.size());
        setLeftMoney(arrayList.get(index));
        arrayList.remove(index);
    }
}
